﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link rel="icon" href="~/Content/Home/image/logo/animated_favicon.gif" type="image/gif" />

    <link href="~/Content/BootStrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/Home/css/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/Content/Home/js/datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Content/Home/js/owl-carousel/owl.carousel.css" rel="stylesheet" />
    <link href="~/Content/Home/css/themecss/lib.css" rel="stylesheet" />
    <link href="~/Content/Home/js/jquery-ui/jquery-ui.min.css" rel="stylesheet" />


    <link href="~/Content/Home/css/themecss/so_megamenu.css" rel="stylesheet" />
    <link href="~/Content/Home/css/themecss/so-categories.css" rel="stylesheet" />
    <link href="~/Content/Home/css/themecss/so-listing-tabs.css" rel="stylesheet" />
    <link href="~/Content/Home/css/theme.css" rel="stylesheet" />
    <link href="~/Content/Home/css/responsive.css" rel="stylesheet" />

    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    @RenderSection("Head", required: false)
</head>
<body style="background-color:#f7dbeb">
    <div id="wrapper" class="wrapper-full banners-effect-7">
        <!-- 公共头  -->
        <header id="header" class=" variantleft type_1">
            <!-- 最顶部的 -->
            <div class="header-top compact-hidden">
                <div class="container">
                    <div class="row">
                        <div class="header-top-left form-inline col-sm-6 col-xs-12 compact-hidden">
                        </div>
                        <div class="header-top-right collapsed-block text-right  col-sm-6 col-xs-12 compact-hidden">
                            <h5 class="tabBlockTitle visible-xs">More<a class="expander " href="#TabBlock-1"><i class="fa fa-angle-down"></i></a></h5>
                            <div class="tabBlock" id="TabBlock-1">
                                <ul class="top-link list-inline">
                                    @*根据用户登录状态，分别显示不同的选项*@
                                    @if (Shop.User.UserState.GetUserState() == null)
                                    {
                                        <a href="@Url.Action("UsersLogin", "User")">登陆</a>
                                        <a href="@Url.Action("UsersReg", "User")"> 注册</a>
                                    }
                                    else
                                    {
                                        <li class="account" id="my_account">
                                            <input type="text" value="1" hidden="hidden" id="yzuser" />
                                            <a href="#" title="My Account" 
                                            class="btn btn-xs dropdown-toggle"
                                            data-toggle="dropdown">
                                                <span>@Shop.User.UserState.GetUserState().UName</span>
                                                <span class="fa fa-angle-down"></span>
                                            </a>
                                            <ul class="dropdown-menu ">
                                                <li>
                                                    <a href="@(Url.Action("ShopCar", "Home"))">我的购物车</a>
                                                </li>
                                                <li>
                                                    <a onclick="UserQuit();">安全退出</a>
                                                </li>
                                            </ul>
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- //最顶部的 -->
            <!-- 带搜索的那一块的 -->
            <div class="header-center left">
                <div class="container">
                    <div class="row">
                        <!-- 商城的Logo -->
                        @*<div class="navbar-logo col-md-3 col-sm-12 col-xs-12">*@
                        <div class="col-sm-12 search-pro">
                            <a href="@Url.Action("HomePage", "Home")">@*<img src="@(new Shop.Page.Services.OtherAccess().GetOtherInfo(5).Value)" title="九七电子书" alt="九七电子书" style="width:1024px;height:200px" />*@</a>
                        </div>
                        <!-- //商城的 Logo -->
                        <!-- 搜索 -->
                        <div id="sosearchpro" class="col-sm-10 search-pro">
                            <form method="GET" action="/Home/WaresSearch">
                                <div id="search0" class="search input-group">
                                    <input class="autosearch-input form-control" type="text" value="" size="50" autocomplete="off" placeholder="输入要搜索的内容" name="Search" id="Search">
                                    <span class="input-group-btn">
                                        <button type="submit" class="button-search btn btn-primary" name="submit_search"><i class="fa fa-search"></i></button>
                                    </span>
                                </div>
                                <input type="hidden" name="route" value="product/search" />
                            </form>
                        </div>
                        <!-- //搜索 -->
                        <!-- 购物车 -->
                        <div class="col-md-2 col-sm-5 col-xs-12 shopping_cart pull-right">
                            <div id="cart" class=" btn-group btn-shopping-cart">
                                <a class="top_cart " href="@(Url.Action("ShopCar", "Home"))">
                                    <div class="shopcart">
                                        <span class="handle pull-left"></span>
                                        <span class="title">我的购物车</span>
                                        <p class="text-shopping-cart cart-total-full"></p>

                                    </div>
                                </a>
                            </div>
                        </div>

                    </div>

                </div>
            </div>
            <!-- //带搜索的那一块的 -->
            <!-- Header Bottom -->
            <div class="header-bottom">
                <div class="container">
                    <div class="row">
                        <div class="sidebar-menu col-md-3 col-sm-6 col-xs-12 ">
                            <div class="responsive so-megamenu ">
                                <div class="so-vertical-menu no-gutter compact-hidden">
                                    <nav class="navbar-default">
                                        <div class="container-megamenu vertical  ">
                                            <div id="menuHeading">
                                                <div class="megamenuToogle-wrapper">
                                                    <div class="megamenuToogle-pattern">
                                                        <div class="container">
                                                            <div>
                                                                <span></span>
                                                                <span></span>
                                                                <span></span>
                                                            </div>
                                                            所有类别
                                                            <i class="fa pull-right arrow-circle fa-chevron-circle-up" id="alllb"></i>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="navbar-header">
                                                <button type="button" id="show-verticalmenu" data-toggle="collapse" class="navbar-toggle fa fa-list-alt"></button>
                                            </div>
                                            <div class="vertical-wrapper">
                                                <span id="remove-verticalmenu" class="fa fa-times"></span>
                                                <div class="megamenu-pattern">
                                                    <ul class="megamenu">
                                                        @{IList<Shop.Wares.Models.WaresCategory> wcinfo 
                                                            = new Shop.Wares.Services.WaresAccess().GetWinfo();}
                                                        @foreach (var item in wcinfo)
                                                        {
                                                            <li class="item-vertical css-menu with-sub-menu hover">
                                                                <p class="close-menu"></p>
                                                                <a href="#" class="clearfix">
                                                                    <span>@item.CName</span>
                                                                    <b class="caret"></b>
                                                                </a>
                                                                @Html.Action("_LayoutCategory", "Home", new {
                                                                     CID = item.CID 
                                                                })
                                                            </li>
                                                        }
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </nav>
                                </div>
                            </div>

                        </div>
                        <!-- 横着的导航条 -->
                        <div class="megamenu-hori header-bottom-right  col-md-9 col-sm-6 col-xs-12 ">
                            <div class="responsive so-megamenu ">
                                <nav class="navbar-default">
                                    <div class="container-megamenu  horizontal">

                                        <div class="navbar-header">
                                            <button type="button" id="show-megamenu" data-toggle="collapse" class="navbar-toggle">
                                                <span class="icon-bar"></span>
                                                <span class="icon-bar"></span>
                                                <span class="icon-bar"></span>
                                            </button>
                                            Navigation
                                        </div>

                                        <div class="megamenu-wrapper">
                                            <span id="remove-megamenu" class="fa fa-times"></span>
                                            <div class="megamenu-pattern">
                                                <div class="container">
                                                    <ul class="megamenu " data-transition="slide" data-animationtime="250">
                                                        <li class="">
                                                            <p class="close-menu"></p>
                                                            <a href="@Url.Action("HomePage", "Home")" class="clearfix">
                                                                <strong>首页</strong>
                                                                <span class="label"></span>
                                                            </a>
                                                        </li>
                                                        @*<li class="">
                                                                <p class="close-menu"></p>
                                                                <a href="#" class="clearfix">
                                                                    <strong>关于我们</strong>
                                                                    <span class="label"></span>
                                                                </a>
                                                            </li>*@
                                                    </ul>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </nav>
                            </div>
                        </div>

                        <!-- //横着的导航条 -->
                    </div>

                </div>

            </div>
            @RenderBody()
        </header>
        <!-- //公共头  -->
        @*内容页*@

        <script type="text/javascript">
            var $typeheader = 'header-home1';
            //-->
        </script>
        <!-- 底部导航栏 -->
        <footer class="footer-container">
            <!-- Footer Top Container -->
            <section class="footer-top">
                <div class="container content">
                    <div class="row">
                        @{IList<Shop.Page.Models.HomeBottom> hblist = new Shop.Page.Services.HomeBottomAccess().GetHomeBottomInfoByType(0); }
                        @for (int i = 0; i < hblist.Count; i++)
                        {
                            <div class="col-sm-6 col-md-3 box-information">
                                <div class="module clearfix">
                                    <h3 class="modtitle">@hblist[i].HBName</h3>
                                    <div class="modcontent">
                                        @{IList<Shop.Page.Models.HomeBottom> shblist = new Shop.Page.Services.HomeBottomAccess().GetHomeBottomInfoBySuperior(hblist[i].HBID);}
                                        <ul class="menu">
                                            @for (int s = 0; s < shblist.Count; s++)
                                            {
                                                <li><a href="../@shblist[s].HBHref">@shblist[s].HBName</a></li>
                                            }
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        }



                        <div class="col-sm-6 col-md-3 collapsed-block ">
                            <div class="module clearfix">
                                <h3 class="modtitle">联系我们</h3>
                                <div class="modcontent">
                                    <ul class="contact-address">
                                        <li><span class="fa fa-map-marker"></span>地址:@(new Shop.Page.Services.OtherAccess().GetOtherInfo(0).Value)</li>
                                        <li><span class="fa fa-envelope-o"></span> Email: <a href="#">@(new Shop.Page.Services.OtherAccess().GetOtherInfo(1).Value)</a></li>
                                        <li><span class="fa fa-phone">&nbsp;</span> 电话 1: @(new Shop.Page.Services.OtherAccess().GetOtherInfo(2).Value) <br>电话 2: @(new Shop.Page.Services.OtherAccess().GetOtherInfo(3).Value)</li>
                                    </ul>
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-12 collapsed-block footer-links">
                            <div class="module clearfix">
                                <div class="modcontent">
                                    <hr class="footer-lines">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
            <!-- 底部导航栏 -->
            <!-- 最下面的导航条 -->
            <div class="footer-bottom-block ">
                <div class="container" ui-sortable>
                    <div class="row">
                        <div class="col-sm-5 copyright-text">版权所有 &copy; @(new Shop.Page.Services.OtherAccess().GetOtherInfo(4).Value)</div>
                        <div class="col-sm-7">
                            <div class="block-payment text-right"></div>
                        </div>
                        <!--Back To Top-->
                        <div class="back-to-top"><i class="fa fa-angle-up"></i><span>顶部</span></div>

                    </div>
                </div>
            </div>
            <!-- 最下面的导航条 -->


        </footer>
        <!-- //end Footer Container -->
    </div>
    <link href="~/Content/Home/css/themecss/cpanel.css" rel="stylesheet" />
    <!-- 预压屏 -->
    <div id="loader-wrapper">
        <div id="loader"></div>
        <div class="loader-section section-left"></div>
        <div class="loader-section section-right"></div>
    </div>
    <!-- 预压屏 -->
    @*<script src="~/Content/Home/js/jquery-2.2.4.min.js"></script>*@
    <script src="~/Content/BootStrap/js/bootstrap.min.js"></script>
    <script src="~/Content/Home/js/owl-carousel/owl.carousel.js"></script>
    <script src="~/Content/Home/js/themejs/libs.js"></script>
    <script src="~/Content/Home/js/unveil/jquery.unveil.js"></script>
    <script src="~/Content/Home/js/countdown/jquery.countdown.min.js"></script>
    <script src="~/Content/Home/js/dcjqaccordion/jquery.dcjqaccordion.2.8.min.js"></script>
    <script src="~/Content/Home/js/datetimepicker/moment.js"></script>
    <script src="~/Content/Home/js/datetimepicker/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Content/Home/js/jquery-ui/jquery-ui.min.js"></script>

    <script src="~/Content/Home/js/themejs/application.js"></script>
    <script src="~/Content/Home/js/themejs/toppanel.js"></script>
    <script src="~/Content/Home/js/themejs/so_megamenu.js"></script>
    <script src="~/Content/Home/js/themejs/addtocart.js"></script>
    @*<script src="~/Content/Home/js/themejs/cpanel.js"></script>*@
<script type="text/javascript">
        if ($("#yzuser").val() == '1') {
            HomeShopCar();
        }
        $(document).ready(function () {
            $('.vertical-wrapper').addClass('so-vertical-active');
            $('.vertical-wrapper').removeClass('so-vertical-active');
        });

        function buttonComments(WID) {
            var comments = prompt("请输入您的评论: ", "");
            var pList = { comments: comments, WID: WID};
            $.ajax({
                url: '@Url.Action("AddComments", "Home")',
                type: 'post',
                dataType: 'text',
                async: false,
                data: pList,
                success: function (data) {
                    if (data=="0") {
                         alert("添加评论成功");
                            location.href = '@Url.Action("HomePage", "Home")';
                            window.location.reload();
                    }
                    }
                });
        }

        //退出
        function UserQuit() {
            var gnl = confirm("确定要退出吗?");
            if (gnl == true) {
                $.ajax({
                    url: '@Url.Action("UserQuit", "Home")',
                    type: 'post',
                    dataType: 'text',
                    async: false,
                    success: function (data) {
                        if (data == "NO") {
                            alert("退出失败");
                        }
                        else {
                            alert("退出成功");
                            location.href = '@Url.Action("HomePage", "Home")';
                            window.location.reload();
                        }
                    }
                });
            }
        }
        function HomeShopCar() {
            $.ajax({
                url: '@Url.Action("_HomeShopCar", "Home")',
                type: 'post',
                dataType: 'text',
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#cart").html(data);
                    }
                }
            });
        }
</script>
</body>



</html>
